1. Field of the Invention
The present invention relates to an electronic apparatus that can be connected to a network and a method of controlling this electronic apparatus.
2. Description of the Related Art
Among the network protocols widely used at preset is TCP (Transmission Control Protocol)/IP (Internet Protocol). TCP/IP is constituted by five hierarchical layers. The five layers are a physical layer, a network-interface layer, an Internet layer, a transport layer, and an application layer. For each hierarchical layer, a network management method has been stipulated.
The Internet layer of TCP/IP defines a mechanism and a packet format. The mechanism transfers packets from one apparatus to the end-destination. The packet format is applied to packets that should be transmitted through the Internet layer.
The packets transmitted through the Internet layer are called IP packets. Each IP packet consists of an IP header and a data part. The IP header contains a destination IP address and a source IP address. The relays provided on the network transfer packets to the target terminal, in accordance with these IP addresses.
DHCP (Dynamic Host Configuration Protocol) is a protocol that automatically allocates IP addresses to the terminals provided on the network. A DHCP server may receive an IP-address allocation request from a terminal. Upon receiving the request, the DHCP server transmits an appropriate IP address to the MAC (Media Access Control) address of the terminal that has made the IP-address allocation request. (See, for example, Jpn. Pat. Appln. Laid-Open Publication No. 2001-36561.)
The terminal may have no response from the DHCP server or may be informed that no IP address can be allocated from the DHCP server. In either case, the terminal performs APIA (Automatic Private IP Addressing) function. The APIA function is to automatically set one of the private IP addresses for AutoIP, which does not exist on the same network. The IP address thus allocated by performing the APIA function is called AutoIP address.
After setting the Auto IP address, the terminal searches for the DHCP server at specific time intervals. Upon finding the DHCP server and thus obtaining the IP address, the terminal discards the AutoIP address set by the APIA function and switches the address to the IP address acquired from the DHCP server. This switching of addresses is automatically accomplished even while the terminal is communicating with any other terminal by using the AutoIP address.
When the IP address is switched to another during the session, a transmission error will occur. During a long-lasting session such as streaming distribution of data, it is quite possible that the IP address is switched. If the IP address is switched during the streaming distribution, the playback of contents is interrupted.